package com.ssy.lingxi.purchase.serviceimpl.tender;

import com.ssy.lingxi.common.model.dto.UserLoginCacheDTO;
import com.ssy.lingxi.purchase.entity.tender.SubmitTenderInCheckRecord;
import com.ssy.lingxi.purchase.repository.tender.SubmitTenderInCheckRecordRepository;
import com.ssy.lingxi.purchase.service.tender.ISubmitTenderInCheckRecordService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 招标实现类
 * @author jw.chen
 * @version 2.0.0
 * @date 2021/3/1
 */
@Service
public class SubmitTenderInCheckRecordServiceImpl implements ISubmitTenderInCheckRecordService {

    @Resource
    private SubmitTenderInCheckRecordRepository submitTenderInCheckRecordRepository;

    /**
     * 查询投标内部审核记录
     */
    @Override
    public List<SubmitTenderInCheckRecord> getSubmitTenderInCheckRecord(UserLoginCacheDTO sysUser, Long submitTenderId){
        return submitTenderInCheckRecordRepository.findByMemberIdAndMemberRoleIdAndSubmitTenderIdOrderByCreateTime(sysUser.getMemberId(), sysUser.getMemberRoleId(), submitTenderId);
    }
}

